package com.edais.dao;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Repository;

import com.edais.domain.UserChannelPoint;
import com.edais.persistence.UserChannelPointMapper;

@Repository

public class UserChannelPointDao {
	
	@Autowired
	private UserChannelPointMapper userChannelPointMapper;

	/**
	 * 获取用户渠道等级积分数据
	 * @param parm
	 * @return
	 * @throws Exception
	 */
	public UserChannelPoint findChannelPointByParm(Map<String,Object> parm) throws Exception {
		return userChannelPointMapper.findChannelPointByParm(parm);
	}
	
	/**
	 * 增加用户渠道等级积分数据
	 * @param userChannelPoint
	 * @throws Exception
	 */
	public void addChannelPoint(UserChannelPoint userChannelPoint) throws Exception {
		userChannelPointMapper.addChannelPoint(userChannelPoint);
	}

	/**
	 * 更新用户渠道等级积分数据
	 * @param userChannelPoint
	 * @return
	 * @throws Exception
	 */
	public int updateChannelPoint(UserChannelPoint userChannelPoint) throws Exception {
		return userChannelPointMapper.updateChannelPoint(userChannelPoint);
	}

}
